<!--
หน้าเพจของการสร้างกราฟ
-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <title><!--Or_Skin[title]--></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <script type="text/javascript" src="../../lib/dojo/dojo/dojo.js" charset="utf-8" data-dojo-config="isDebug: true,parseOnLoad: true"></script>
        <script language="JavaScript">
            // Require the basic 2d chart resource: Chart2D
            dojo.require("dojox.charting.Chart2D");

            // Require the theme of our choosing
            //"Claro", new in Dojo 1.6, will be used
            dojo.require("dojox.charting.themes.Claro");

            // Any plugins we choose to use would be required here as well...
            // x and y coordinates used for easy understanding of where they should display
            // Data represents website visits over a week period
            chartData = [
                { x: "1", y: "19021" },
                { x: "1", y: "12837" },
                { x: "1", y: "12378" },
                { x: "1", y: "21882" },
                { x: "1", y: "17654" },
                { x: "1", y: "15833" },
                { x: "1", y: "16122" }
            ];

            // When the DOM is ready and resources are loaded...
            dojo.ready(function() {

                // Create the chart within it's "holding" node
                var pieChart = new dojox.charting.Chart2D("chartNode");

                // Set the theme
                pieChart.setTheme(dojox.charting.themes.Claro);

                // Add the only/default plot
                pieChart.addPlot("default", {
                    type: "Pie",
                    radius: 200,
                    fontColor: "black",
                    labelOffset: "-20"
                });

                // Add the series of data
                pieChart.addSeries("January",chartData);

                // Render the chart!
                pieChart.render();

            });
        </script>
    </head>
    <body>
        <h1>Demo: Basic Programmatic Chart</h1>

        <!-- create the chart -->
        <div id="chartNode" style="width: 550px; height: 550px;"></div>
    </body>
</html>
